<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

    <script src="resources/js/jquery-1.9.1.js"></script>
    <script src="resources/js/html2canvas.js"></script>
    <script src="resources/js/html2canvas.svg.js"></script>

</head>
<body>

    <div id="myDiv" style="width: 500px; height: 1000px; background-color: red;">
        <span class="_jsplumb" style="width: 50px; height: 100px; background-color: green;">hello</span>
    </div>

    <a id="down_button" href="">下载</a>

    <script type="text/javascript">
        $(function(){
            html2canvas( $('#myDiv') ,
            {
                onrendered: function(canvas)
                {
                    $('#down_button').attr( 'href' , canvas.toDataURL() ) ;
                    $('#down_button').attr( 'download' , 'myjobdeer.png' ) ;
                }
            });
        });
    </script>
</body>
</html>